package com.atguigu.ssyx.activity.api;

import com.atguigu.ssyx.activity.service.SeckillSkuService;
import com.atguigu.ssyx.model.activity.SeckillSku;
import com.atguigu.ssyx.vo.activity.SeckillSkuVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/activity")
public class SeckillSkuApiController {


    @Autowired
    private SeckillSkuService seckillSkuService;

    // 获取商品秒杀详情信息
    @GetMapping("inner/getSeckillSkuVo/{skuId}")
    public SeckillSkuVo getSeckillSkuVo(@PathVariable("skuId") Long skuId) {
        SeckillSkuVo seckillSkuVo = seckillSkuService.getSeckillSkuVo(skuId);
        return seckillSkuVo;
    }
}
